<template>
    <div>
        <el-form>
            <el-form-item>

            </el-form-item>
            <!--搜索区域-->
            <div style="margin: 0px 0 ;display: inline">
                <el-input v-model="searchForm.name" placeholder="名称" style="width: 20%" clearable></el-input>
                <el-button type="primary" style="margin-left: 5px" @click="">搜索</el-button>

                <el-button type="primary" style="margin-left: 5px" @click="">新增</el-button>

                <el-popconfirm
                        title="确定批量删除吗？" @confirm=""
                >
                    <template #reference>
                        <el-button type="danger" slot="reference" :disabled="delBtStatus">删除</el-button>
                    </template>
                </el-popconfirm>
            </div>
        </el-form>
        <el-table
                ref="multipleTable"
                :data="tableData"
                tooltip-effect="dark"
                style="width: 100%"
                border
                stripe
                @selection-change="">
            <el-table-column
                    type="selection"
                    width="55">
            </el-table-column>

            <el-table-column
                    prop="name"
                    label="姓名"
                    width="120">
            </el-table-column>
            <el-table-column
                    prop="code"
                    label="唯一编码"
                    width="120">
            </el-table-column>
            <el-table-column
                    prop="remark"
                    label="描述"
                    show-overflow-tooltip>
            </el-table-column>
            <el-table-column label="状态"
                           prop="statu"
                           >
                <template slot-scope="scope">
                    <el-tag size="small" v-if="scope.row.statu == 1" type="success">正常</el-tag>
                    <el-tag size="small" v-else-if="scope.row.statu == 0" type="danger">禁用</el-tag>
                </template>
            </el-table-column>

            <el-table-column label="添加操作" prop="icon">
                <el-button type="text" @click="">分配权限</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="">编辑</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="">删除</el-button>

            </el-table-column>
        </el-table>

        <el-pagination
                @size-change=""
                @current-change=""
                :current-page="currentPage"
                :page-sizes="[5, 10, 20]"
                :page-size="pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="total">
        </el-pagination>
    </div>
</template>

<script>
    export default {
        name: "Role",
        data(){
            return {
                searchForm: {},
                delBtStatus:true,
                currentPage:1,
                pageSize:10,
                total:0,
                tableData:[{
                    name: "普通用户",
                    code: "normal",
                    remark: "法国给给和上单是的风格和梵蒂冈活动分工和风格的法国",
                    statu: 1
                },{
                    name: "超级管理员",
                    code: "admin",
                    remark: "法国给给和上单是的风格和梵蒂冈活动分工和风格的法国",
                    statu: 0
                },{
                    name: "普通用户",
                    code: "admin",
                    remark: "法国给给和上单是的风格和梵蒂冈活动分工和风格的法国",
                    statu: 1
                }]
            }
        },
        search(){
            
        },
        multiplyHandleDelete(id){

        },

        handleSizeChange(pageSize){//改变当前每页的个数触发
            this.pageSize = pageSize
            // this.load()
        },

        handleCurrentChange(pageNum){
            this.currentPage = pageNum
            // this.load()
        }

    }
</script>

<style scoped>

</style>